package com.clonedemo;

public class CloneA implements Cloneable
{
	private int ID = 1;
	private Integer temp = 11;
	private String name = "name";
	private int[] arr = new int[1];
	
	@Override
	public CloneA clone() throws CloneNotSupportedException 
	{
		CloneA c = (CloneA) super.clone();
		c.arr = this.arr.clone();
		return c;
	}

	public int[] getArr() {
		return arr;
	}


	public void setArr(int[] arr) {
		this.arr = arr;
	}


	public int getID() 
	{
		return ID;
	}

	public void setID(int iD)
	{
		ID = iD;
	}
	
	public void setArrValue(int i)
	{
		arr[0] = i;
	}

	@Override
	public String toString() 
	{
		return this.ID + ":" + temp + " : " + name + " : " + arr[0];
	}

	public Integer getTemp() {
		return temp;
	}
	
	

	public void setTemp(Integer temp) {
		this.temp = temp;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
